﻿using System;

namespace CellarDoor.Gui.Elements
{
    public class UiMenuStrip : UiMenu
    {
        /// <summary>
        /// Creates a button element
        /// </summary>
        public UiMenuStrip()
            : base()
        {
            Initialize();
        }

        /// <summary>
        /// Creates a button element
        /// </summary>
        public UiMenuStrip(UiElement parent)
            : base(parent)
        {
            Initialize();
        }

        private void Initialize()
        {
            ElementName = "MenuStrip";
            Height = 20;
            Width = 100;
            Dock = UiDockStyles.Top;
        }

        public override UiMenuItem AddMenuItem(UiMenuItem item)
        {
            base.AddMenuItem(item);
            item.ElementName = "MenuStripItem";
            item.SubMenu.Align = UiAlignStyle.OutsideBottom | UiAlignStyle.Left;
            item.Dock = UiDockStyles.Left;
            return item;
        }
    }
}
